package org.khd.org.mapper;

import org.apache.ibatis.annotations.Param;
import org.khd.org.domain.Employee;
import org.khd.org.query.EmployeeQuery;

import java.util.List;

public interface EmployeeMapper {

    //新增Employee数据
    void insertEmp(Employee employee);

    //修改Employee数据
    void updateEmp(Employee employee);

    //根据id删除Employee数据
    void deleteEmpById(Long id);

    //根据id查询Employee数据
    Employee queryEmpById(Long id);

    //查询Employee数据
    List<Employee> queryEmpAll();

    //用来查询Employee数据的总条数
    Long queryEmpCount(EmployeeQuery query);

    //用来查询Employee每页的数据
    List<Employee> queryEmpPage(EmployeeQuery query);

    //批量删除Employee数据
    void patchDeleteEmp(List<Long> ids);

    //查询用户名
    Employee getByUserName(String username);

    Employee getByPhoneOrEmail(@Param("phone") String phone, @Param("email") String email);
}
